package com.csun.cmny.provider.service.impl;

import com.csun.cmny.core.support.BaseService;
import com.csun.cmny.provider.dao.UacFirstLvelMerchantBindMapper;
import com.csun.cmny.provider.model.domain.UacFirstLvelMerchantBind;
import com.csun.cmny.provider.service.UacFirstLvelMerchantBindService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Slf4j
@Service
@Transactional
public class UacFirstLvelMerchantBindServiceImpl extends BaseService<UacFirstLvelMerchantBind> implements UacFirstLvelMerchantBindService {

    @Resource
    private UacFirstLvelMerchantBindMapper uacFirstLvelMerchantBindMapper;

    @Override
    public int checkServiceFirstLevelUsed(Long firstLevelId) {
        UacFirstLvelMerchantBind uacFirstLvelMerchantBindQuery = new UacFirstLvelMerchantBind();
        uacFirstLvelMerchantBindQuery.setFirstLevelId(firstLevelId);
        return uacFirstLvelMerchantBindMapper.selectCount(uacFirstLvelMerchantBindQuery);
    }
}
